package ophiux.common.utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 * 文件工具类
 * @author chenh
 *
 */
public class FileUtil {

	public static String readerbyLine(String filePath){
		StringBuilder content = new StringBuilder();
		try {
			File file = new File(filePath);
			BufferedReader reader = new BufferedReader(new FileReader(file));
			String temp = null;
			while((temp=reader.readLine())!=null){
				content.append(temp);
			}
			reader.close();//关闭流
		} catch (Exception e) {
			e.printStackTrace();
		}
		return content.toString();
	}
	
}
